﻿using AutoMapper;
using Traceable.App.Application.Command.Aquaculture;
using Traceable.App.Application.Command.Goods;
using Traceable.App.Application.Command.Processing;
using Traceable.App.Application.Command.Slaughter;
using Traceable.App.DTOS;
using Traceable.Domian;

namespace Traceable.App
{
    public class MapperProfile:Profile
    {
        public MapperProfile()
        {
            //商品信息
            CreateMap<Goods_Table, GoodsDto>();
            //溯源基本信息新增
            CreateMap<CreateGoodsTraceCommand, Traceable_Table>();
            //溯源基本信息编辑
            CreateMap<UpdateGoodsTraceCommand, Traceable_Table>().ReverseMap();
            //溯源养殖信息获取
            CreateMap<Aquaculture_Table, AquacultureDto>();
            //溯源养殖信息设置
            CreateMap<UpdateAquacultureCommand, Aquaculture_Table>().ReverseMap();
            //获取养殖免疫信息
            CreateMap<Immunity_Table, ImmunityDto>();
            //免疫信息设置
            CreateMap<CreateImmunityCommand, Immunity_Table>().ReverseMap();
            //公司企业获取
            CreateMap<Enterprise_Table, EnterpriseDto>();
            //公司企业设置
            CreateMap<CreateEnterpriceCommand, Enterprise_Table>().ReverseMap();
            //保存图片到数据库
            CreateMap<UpImageListCommand,Image_Table>();
            //获取图片信息
            CreateMap<Image_Table, ImageDto>();
            //获取屠宰信息
            CreateMap<Slaughter_Table,SlaughterDto>();
            //屠宰信息设置
            CreateMap<SeaveSlaugtherCommand, Slaughter_Table>().ReverseMap();
            //获取加工信息
            CreateMap<Processing_Table, ProcessingDto>();
            //加工信息设置
            CreateMap<SeaveProcessingCommand, Processing_Table>().ReverseMap();
            //获取供应商信息
            CreateMap<Suppliers_Table, SupplierDto>();
            //供应商设置
            CreateMap<CreateSuppliersCommand,Suppliers_Table>().ReverseMap();





        }
    }
}
